package com.zhf.mapper;

import com.zhf.domain.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author: ZhaoHuanfeng
 * @Date: 2020/11/14 16:48
 */
public interface RoleMapper {
    /**
     * 根据id查询用户的角色信息
     */
    @Select("SELECT * FROM sys_role r INNER JOIN sys_user_role ur ON r.id = ur.roleid WHERE ur.userid = #{uid}")
    public List<Role> findById(int uid);
}
